<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>조립PC의 대명사- PC Master~!~!</title>

<link rel="stylesheet" href="/web/resources/css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/web/resources/css/slide.css" type="text/css" media="screen" />

 	<!-- PNG FIX for IE6 -->
<!--[if lte IE 6]>
	<script type="text/javascript" src="js/pngfix/supersleight-min.js"></script>
<![endif]-->
 
   <!-- jQuery - the core -->
<script src="/web/resources/js/jquery-1.4.4.min.js" type="text/javascript"></script>
<!-- Sliding effect -->
<script src="/web/resources/js/slide.js" type="text/javascript"></script>
</head>
<body>
<!-- Panel -->
<div id="toppanel">
	<div id="panel">
		<div class="content clearfix">
			<div class="left">
				<h1>PC - Master에 오신 것을<br/>
					환영합니다.</h1><br/>
				<h2></h2>		
				<p class="grey"></p>
			</div>
			<div class="left">
				<!-- Login Form -->
				<form class="clearfix" action="/web/member/loginCheck" method="get">
					<h2>로그인</h2>
					<label class="grey" for="log">Login ID : </label>
						<input class="field" type="text" name="member_id" id="log" value="" size="23" style="height:25px"/>
					<label class="grey" for="pwd">Password : </label>
						<input class="field" type="password" name="member_password" id="pwd" size="23" style="height:25px"/>
					<label>
						<input name="rememberme" id="rememberme" type="checkbox" value="forever" /> 
					&nbsp;아이디 저장</label>
					<div class="clear"></div>
					
<%-- 					<!-- 세션에서 id체크해서 null 이면 -->
					<c:if test="${user == null}"> --%>
						<input type="submit" name="submit" value="로그인" class="bt_login" />
<%-- 					</c:if>
					
					<!-- 세션에서 id체크해서 null 이 아니면 -->
					<c:if test="${user != null}">
						<input type="submit" name="submit" value="로그아웃" class="bt_logout" />
					</c:if> --%>
					<a class="lost-pwd" href="#">비밀번호를 잊으셨나요?</a>
				</form>
			</div>
			<div class="left right">			
				<!-- Register Form -->
				<form action="/web/member/joinForm" method="get">
					<h2>아직 회원가입을 안 하셨나요?</h2>				
					<label class="grey" for="signup">Login ID:</label>
					<input class="field" type="text" name="signup" id="signup" value="" size="23" style="height:25px "/>
					<label class="grey" for="email">E-mail:</label>
					<input class="field" type="text" name="email" id="email" size="23" style="height:25px "/>
					<label>비밀번호는 E-mail로 전송됩니다.</label>
					<input type="submit" name="submit" value="회원가입" class="bt_register" />
				</form>
			</div>
		</div>
	</div> <!-- /login -->	

	<!-- 하단 탭 부분 -->	
	<div class="tab" style="position:relative;left:0; width:1200px; margin-left: 0px">
 		
 		<!-- 로그인 된 아이디가 없으면 -->
 		<c:if test="${user == null }">
			<ul class="login">
				<li class="left">&nbsp;</li>
				<li>Guest님 환영합니다!</li>
				<li class="sep">|</li>
				<li id="toggle">
					<a id="open" class="open" href="#">로그인 | 회원가입</a>
					<a id="close" style="display: none;" class="close" href="#">Close</a>			
				</li>
				<li class="right">&nbsp;</li>
			</ul> 
		</c:if>
		
		<!-- 로그인 된 아이디가 admin이 아니고 일반회원일 경우 -->
		<c:if test="${user != null && user != 'admin'}">
			<ul class="login">
				<li class="left">&nbsp;</li>
				<li><strong style="font-size:13pt;color:#F29661; ">${user}</strong> 님 환영합니다!</li>
				<li class="sep">|&nbsp;</li>
				<li id="toggle">
					<a href="/web/member/logout" >로그아웃</a>
				</li>
				<li class="sep">|&nbsp;
					<a href="/web/member/updateForm" >마이체이지</a>
		
					<a id="close" style="display: none;" class="close" href="#">Close</a>			
				</li>
				<li class="right">&nbsp;</li>
			</ul>
		</c:if>
		
		<!-- 로그인 된 아이디가 admin일 경우 -->
		<c:if test="${user == 'admin'}">
			<ul class="login">
				<li class="left">&nbsp;</li>
				<li><strong style="font-size:13pt;color:#F29661; ">${user}</strong> 님 환영합니다!</li>
				<li class="sep">|&nbsp;</li>
				<li id="toggle">
					<a href="/web/member/logout" >로그아웃</a>
				</li>
				<li class="sep">|&nbsp;
					<a href="/web/goods/form" >관리자화면</a>
					<a id="close" style="display: none;" class="close" href="#">Close</a>			
				</li>
				<li class="right">&nbsp;</li>
			</ul>
			 
						
		</c:if>
	</div> <!-- / top -->

</div> 
<!--panel -->
</body>
</html>